<template>
	<view>
		<uni-list>
			<uni-list-item v-for="(item,index) in leaveArr" :key="index" showArrow 
				@click="leaveIndexSkip(item)" clickable>
				<template v-slot:body>
					<view style="margin-bottom: 2px;">{{item.className}}</view>
				</template>
			</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	export default {
		name: 'leveRegistration',
		data() {
			return {
				leaveArr: [],
				loginId: uni.getStorageSync("loginId"),
			}
		},
		mounted() {
			this.getClassData()
		},
		methods: {
			getClassData() {
				this.$api.teacher.tecClassList(this.loginId).then(res => {
					this.leaveArr = res.data
				})
			},
			leaveIndexSkip(item) {
				uni.navigateTo({
					url: `/pages_duty/classTeacher/classControl/classInfoDetail?classId=${item.classId}&className=${item.className}`,
				});
			}
		}
	}
</script>

<style>
	
</style>